package cn.baimo.pojo;

import java.io.Serializable;

/**
 * ClassName: Area
 * Description:地区实体类
 * date: 2020/8/28 0028 15:29:35
 * <p>
 * aid	    int	                主键，自增	地区id
 * areaCode	varchar(50)	        非空	        地区编码
 * areaName	varchar(20)	        非空	        地区名
 * level	tinyint(4)['-1']		        地区级别（1:省份province,2:市city,3:区县district,4:街道street）
 * cityCode	varchar(50)		                城市编码
 * parentId	int['-1']		                地区父节点
 *
 * @author BaiMo
 * @since JDK 1.8
 */
public class Area implements Serializable {
    private int aid;//地区id
    private String areaCode;//地区编码
    private String areaName;//地区名
    private int level;//地区级别（1:省份province,2:市city,3:区县district,4:街道street）
    private String cityCode;//城市编码
    private Area parentArea;//地区父节点

    public Area() {
    }

    public Area(int aid, String areaCode, String areaName, int level, String cityCode, Area parentArea) {
        this.aid = aid;
        this.areaCode = areaCode;
        this.areaName = areaName;
        this.level = level;
        this.cityCode = cityCode;
        this.parentArea = parentArea;
    }

    @Override
    public String toString() {
        return "Area{" +
                "aid=" + aid +
                ", areaCode='" + areaCode + '\'' +
                ", areaName='" + areaName + '\'' +
                ", level=" + level +
                ", cityCode='" + cityCode + '\'' +
                ", parentArea=" + parentArea +
                '}';
    }

    public Area getParentArea() {
        return parentArea;
    }

    public void setParentArea(Area parentArea) {
        this.parentArea = parentArea;
    }

    public int getAid() {
        return aid;
    }

    public void setAid(int aid) {
        this.aid = aid;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

}
